// -----------------------------------------------------------------------
//  <copyright file="IResourceSynchronizer.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2024 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2024-04-07 16:07</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Authorization;

/// <summary>
/// 定义资源同步功能
/// </summary>
public interface IResourceSynchronizer
{
    /// <summary>
    /// 同步资源信息
    /// </summary>
    /// <param name="serviceName">服务名称</param>
    /// <param name="resourceType">资源类型</param>
    /// <param name="resources">资源信息</param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task SyncAsync(string serviceName, ResourceType resourceType, IResource[] resources, CancellationToken cancellationToken = default);
}
